package com.cnd.scm.orm.accessfilter;

import java.io.Serializable;

/**
 * @version V1.0
 * @ClassName: AccessFilterItem
 * @Description:TODO()
 * @author: 李启联
 * @date: 2018-08-16 09:45
 * @Copyright: Copyright (c), 2018-2018
 * 申明：本内容未经作者本人同意,禁止外泄以及用于其他的商业项目.
 */
public class AccessFilterItem implements Serializable {

    protected boolean andCondition;
    protected String filterKey;
    protected Object filterValue;

    /**
     * @param andCondition 使用 and 或者 or 条件拼接
     * @param filterKey    属性名称
     * @param filterValue  属性值
     */
    AccessFilterItem(boolean andCondition, String filterKey, Object filterValue) {
        this.andCondition = andCondition;
        this.filterKey = filterKey;
        this.filterValue = filterValue;
    }

    protected boolean getAndCondition() {
        return andCondition;
    }

    protected String getFilterKey() {
        return filterKey;
    }

    protected Object getFilterValue() {
        return filterValue;
    }

    @Override
    public String toString() {
        return "AndCondition : " + andCondition + "\n" + "FilterKey : " + filterKey + "\n" + "FilterValue : " + filterValue.toString();
    }
}